﻿namespace MSHelpMe.ViewModels
{
    using System.Windows;

    public class ErrorState : PhotoCaptureState
    {
        public ErrorState(PhotoCapture ui)
            : base(ui)
        {

        }

        public override void ShowHideControls()
        {
            ui.Dispatcher.BeginInvoke(
                () =>
                {
                    ui.txtError.Visibility = Visibility.Visible;

                    ui.viewfinder.Visibility = ui.focusBrackets.Visibility = Visibility.Collapsed;
                    ui.btnShutter.Visibility = Visibility.Collapsed;

                    ui.imgPreview.Visibility = ui.words.Visibility = Visibility.Collapsed;
                    ui.txtTip.Visibility = Visibility.Collapsed;
                    ui.scanProgress.Visibility = Visibility.Collapsed;
                    ui.scanProgress.IsIndeterminate = false;
                    ui.btnAccept.Visibility = ui.btnCapture.Visibility = Visibility.Collapsed;
                });
        }

        public override void FocusClick()
        {
            // Do nothing
        }

        public override void ShutterClick()
        {
            // Do nothing
        }

        public override void RecaptureClick()
        {
            // Do nothing
        }

        public override bool AcceptClick()
        {
            return false;
        }
    }
}
